/*
 * @Author: 撒哈拉的花儿 30940518@qq.com
 * @Date: 2025-02-15 00:05:12
 * @LastEditors: 撒哈拉的花儿 30940518@qq.com
 * @LastEditTime: 2025-02-17 23:45:12
 * @FilePath: \base_portal_foreend\src\api\boc\lakeTable.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import request from '@/utils/request'

// 查询入湖生成业务列表
export function listLakeTable(query) {
  return request({
    url: '/boc/lakeTable/list',
    method: 'get',
    params: query
  })
}

// 查询入湖生成业务详细
export function getLakeTable(tableId) {
  return request({
    url: '/boc/lakeTable/' + tableId,
    method: 'get'
  })
}

// 新增入湖生成业务
export function addLakeTable(data) {
  return request({
    url: '/boc/lakeTable',
    method: 'post',
    data: data
  })
}

// 修改入湖生成业务
export function updateLakeTable(data) {
  return request({
    url: '/boc/lakeTable',
    method: 'put',
    data: data
  })
}

// 删除入湖生成业务
export function delLakeTable(tableId) {
  return request({
    url: '/boc/lakeTable/' + tableId,
    method: 'delete'
  })
}

// 查询db数据库列表
export function listDbTable(query) {
  return request({
    url: '/boc/lakeTable/db/list',
    method: 'get',
    params: query
  })
}

// 导入表
export function importGbaseTable(data) {
  return request({
    url: '/boc/lakeTable/importGbaseTable',
    method: 'post',
    params: data
  })
}

// 同步数据库
export function synchGbaseDb(tableName) {
  return request({
    url: '/boc/lakeTable/synchGbaseDb/' + tableName,
    method: 'get'
  })
}

// 预览生成代码
export function previewLakeTable(tableId) {
  return request({
    url: '/boc/lakeTable/previewLake/' + tableId,
    method: 'get'
  })
}